home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
c_news
/
05
/
listings
/
f_timer.asm
< prev
next >
Wrap
Assembly Source File
|
1988-03-03
|
3KB
|
117 lines
PAGE 55,132
NAME f_timer
TITLE FOSSIL Interface Routines for Microsoft C and Turbo C
SUBTTL Copyright 1988 Marshall Presnell; All Rights Reserved
;************************************************************************;
;* *;
;* Assembled with Microsoft Macro Assembler version 5 *;
;* using MIXED.MAC mixed language macro package. *;
;* *;
;************************************************************************;
;========================================================================;
;=----------------------------------------------------------------------=;
;=- -=;
;=- THIS MODULE HAS BEEN RELEASED FOR USE IN C NEWS -=;
;=- -=;
;=- ANY QUESTIONS, COMMENTS, OR PROBLEMS SHOULD BE ADDRESSED TO -=;
;=- -=;
;=- MARSHALL PRESNELL -=;
;=- 13652 LYNN STREET -=;
;=- WOODBRIDGE, VA 22191 -=;
;=- -=;
;=- FIDONET ADDRESS 109/639.106 -=;
;=- -=;
;=----------------------------------------------------------------------=;
;========================================================================;
.8086
INCLUDE MIXED.MAC
SETMODEL
.CODE
;==========================================================================;
; ;
; SYSTEM EQUATES FOR FOSSIL VERSION 5 INTERFACE ;
; ;
;==========================================================================;
SETBAUD EQU 00H
TXCHAR EQU 01H
RXCHAR EQU 02H
STATUS EQU 03H
INIT EQU 04H
DEINIT EQU 05H
DTR EQU 06H
TTICK EQU 07H
OUTFLUSH EQU 08H
OUTPURGE EQU 09H
INPURGE EQU 0AH
TXNOWAIT EQU 0BH
PEEK EQU 0CH
KEYREADNOWAIT EQU 0DH
KEYREAD EQU 0EH
FLOWCONTROL EQU 0FH
CONTROL_C_CHECK EQU 10H
SETCURS EQU 11H
GETCURS EQU 12H
WRANSI EQU 13H
WATCHDOG EQU 14H
WRBIOS EQU 15H
TTICK_FUNCTION EQU 16H
REBOOT EQU 17H
READBLOCK EQU 18H
WRITEBLOCK EQU 19H
BREAK EQU 1AH
DATASTRUCTURE EQU 1BH
INSTALLAPI EQU 7EH
REMOVEAPI EQU 7FH
;===========================================================================
;
; int f_ttint(void)
;
HPROC <f_ttint>,<USES DX>
MOV AH, TTICK ;Load function code to AH
INT 14H ;Call FOSSIL
XOR AH, AH ;Clear upper byte of AX for return
HRET ;Return AX to caller
HENDP f_ttint
;---------------------------------------------------------------------------
;
; int f_ttspeed(void)
;
HPROC <f_ttspeed>,<USES DX>
MOV AH, TTICK ;Load function code to AH
INT 14H ;Call FOSSIL
MOV AL, AH ;Adjust signifigance
XOR AH, AH ;Clear upper byte
HRET ;Return AX to caller
HENDP f_ttspeed
;---------------------------------------------------------------------------
;
; int f_ttmilli(void)
;
HPROC <f_ttmilli>,<USES DX>
MOV AH, TTICK ;Load function code to AH
INT 14H ;Call FOSSIL
MOV AX, DX ;Move DX to AX for return
HRET ;Return AX to caller
HENDP f_ttmilli
END